package com.kma.summer2012.client.events.request;

import com.google.gwt.event.shared.EventHandler;
import com.google.gwt.event.shared.GwtEvent;

/**
 * Created with IntelliJ IDEA.
 * User: EUGENE
 * Date: 2/19/13
 * Time: 11:24 PM
 * To change this template use File | Settings | File Templates.
 */
public class CreateRequestEvent extends GwtEvent<CreateRequestEvent.CreateRequestEventHandler> {
    private static Type<CreateRequestEventHandler> TYPE = new Type<CreateRequestEventHandler>();

    @Override
    public Type<CreateRequestEventHandler> getAssociatedType() {
        return TYPE;
    }

    public static Type<CreateRequestEventHandler> getType() {
        return TYPE;
    }

    @Override
    protected void dispatch(CreateRequestEventHandler createRequestEventHandler) {
        createRequestEventHandler.onCreateRequest();
    }

    public interface CreateRequestEventHandler extends EventHandler {
        void onCreateRequest();
    }
}
